.loading-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #6f5042;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.loading-page .loading-title {
  color: #F2D1C2;
  font-size: 48px;
  margin-bottom: 40px;
  letter-spacing: 4px;
}
.loading-page .loading-container {
  display: flex;
  align-items: center;
  gap: 15px;
}
.loading-page .loading-container .loading-bar {
  width: 300px;
  height: 20px;
  background-color: rgba(242, 209, 194, 0.3);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}
.loading-page .loading-container .loading-bar .loading-progress {
  width: 0;
  height: 100%;
  background-color: #F2D1C2;
  border-radius: 10px;
  transition: width 0.3s ease;
}
.loading-page .loading-container .loading-percentage {
  min-width: 48px;
  color: #F2D1C2;
  font-size: 18px;
  transition: opacity 0.3s ease;
}
.loading-page .start-btn {
  margin-top: 30px;
  padding: 12px 40px;
  font-size: 20px;
  color: #5B3F32;
  background-color: #F2D1C2;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: none;
}
.loading-page .start-btn:hover {
  background-color: #e5c4b5;
  transform: scale(1.05);
}
html {
  background-color: #d6a196;
  user-select: none;
  font-size: 16px;
}
body {
  padding-bottom: env(safe-area-inset-bottom);
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
}
.bg-img {
  width: 100vw;
  height: 100vh;
  background-image: url(../imgs/logo.webp);
  background-repeat: space;
  background-size: clamp(60px, 8vw, 100px) auto;
  opacity: 0.3;
  position: absolute;
  left: 0;
  top: 0;
}
.date {
  width: auto;
  height: min(10vh, 60px);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  justify-content: center;
  font-size: clamp(18px, 2.5vw, 35px);
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  color: #5B3F32;
  background-color: #F2D1C2;
  border-radius: min(7px, 1vw);
  margin-top: 5px;
  padding: 0 2%;
}
.date .time {
  font-size: clamp(14px, 2vw, 25px);
}
.game-container {
  width: min(900px, 80%);
  height: 80vh;
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
}
@media only screen and (max-width: 767px) {
  .game-container {
    width: 95%;
    height: 75vh;
  }
}
.cards-box {
  width: 95%;
  height: 70%;
  position: relative;
}
.card {
  width: clamp(60px, 8vw, 74px);
  height: clamp(62px, 8.2vw, 77px);
  border-radius: min(8px, 1vw);
  background-color: #e5998a;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  justify-content: space-around;
  box-shadow: 3px -3px 0 #646464;
  cursor: pointer;
  position: absolute;
  top: 10px;
  transition: transform 0.2s;
  transform-style: preserve-3d;
  z-index: 1;
}
.card .mask {
  width: 100%;
  height: 100%;
  background-color: #00000035;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  border-radius: inherit;
}
.card .img {
  width: 90%;
  height: 90%;
  border-radius: inherit;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}
@media only screen and (max-width: 767px) {
  .card {
    width: 55px;
    height: 57px;
  }
}
.stored-card {
  width: 95%;
  height: 25%;
  margin-top: min(3%, 20px);
  background-color: #edc884;
  border-radius: min(8px, 1vw);
  position: relative;
}
.stored-card i {
  display: inline-block;
  width: min(9px, 1.2vw);
  height: min(15px, 2vw);
  background-image: url(../imgs/mark.webp);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  position: absolute;
  bottom: -3px;
}
.stored-card .container {
  height: 100%;
  padding: min(5px, 0.7vw) min(5px, 0.7vw) min(8px, 1vw);
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: min(5px, 0.7vw);
}
.stored-card .container .item {
  height: 94%;
  background-color: #ffffff3e;
  border-radius: inherit;
  position: relative;
  border-radius: 8px;
}
.stored-card .container .item i {
  right: -6px;
  bottom: -20px;
}
.btn-module {
  width: clamp(120px, 20%, 200px);
  height: 80%;
  position: absolute;
  right: 5%;
  top: 0;
}
@media only screen and (max-width: 767px) {
  .btn-module {
    width: 100px;
    right: 2%;
  }
}
.opt {
  position: absolute;
  right: 0;
  cursor: pointer;
  width: 100%;
  height: min(6%, 40px);
  font-size: clamp(12px, 1.2vw, 16px);
  color: #5B3F32;
  background-color: #F2D1C2;
  border-radius: min(8px, 1vw);
  display: flex;
  align-items: center;
  justify-content: space-around;
  touch-action: manipulation;
}
@media only screen and (max-width: 767px) {
  .opt {
    font-size: 12px;
    height: 32px;
  }
}
.opt:not(:first-of-type):hover {
  color: #F2C8BE;
  background-color: #5B3F32;
}
.game-levels {
  top: 18%;
  pointer-events: none;
}
.leftover {
  top: 26%;
  pointer-events: none;
}
.audio-switch {
  top: 34%;
  justify-content: center;
}
.change-bgaudio {
  top: 42%;
}
.reorder {
  top: 50%;
}
.reorder.disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  background-color: #D4B5A6 !important;
  color: #8B6F5E !important;
}
.regame {
  top: 58%;
}
.challenge-results {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  background-color: #00000034;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  justify-content: space-around;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 100;
}
.popup {
  width: 30%;
  height: 50%;
  color: #5B3F32;
  background-color: #F2D1C2;
  position: relative;
  border-radius: 8px;
}
.popup .icon {
  width: 45%;
  height: 45%;
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%) rotate(-30deg);
  white-space: nowrap;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.popup button {
  width: 30%;
  height: 16%;
  position: absolute;
  bottom: 20%;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  background-color: #ffa726;
  color: #fff;
}
.popup button:nth-of-type(1) {
  left: 10%;
}
.popup button:nth-of-type(2) {
  right: 10%;
}
.success {
  transform: translateY(-100%);
  transition: all 0.5s ease;
}
.success .icon {
  background-image: url(../imgs/success.webp);
  position: relative;
  z-index: 1;
}
.fail {
  transform: translateY(-100%);
  transition: all 0.5s ease;
}
.fail .icon {
  background-image: url(../imgs/fail.webp);
}
.fail .again {
  width: 40%;
  font-size: 18px;
  left: 50% !important;
  transform: translateX(-50%);
}
.last-level {
  transform: translateY(-100%);
  transition: all 0.5s ease;
  position: relative;
}
.last-level .last {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
}
.last-level .last span:nth-child(1) {
  font-size: 50px;
  margin-bottom: 5%;
}
.last-level .again {
  width: 40%;
  font-size: 18px;
  left: 50% !important;
  transform: translateX(-50%);
}
@keyframes eliminate {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}
.remove-animation {
  animation: eliminate 0.5s forwards;
}
